Fixes bug #328820:
authorFederico Mena Quintero <federico@ximian.com>
Fri, 27 Jan 2006 17:22:17 +0000 (17:22 +0000)
committerFederico Mena Quintero <federico@src.gnome.org>
Fri, 27 Jan 2006 17:22:17 +0000 (17:22 +0000)
2006-01-27  Federico Mena Quintero  <federico@ximian.com>

Fixes bug #328820:

* gtk/gtkfilechooserdefault.c
(gtk_file_chooser_default_class_init): Make GDK_KP_Divide pop up
the location dialog populated to "/".
(tree_view_keybinding_cb): Likewise.
(trap_activate_cb): Likewise.

ChangeLog
ChangeLog.pre-2-10
docs/reference/ChangeLog
docs/reference/gtk/tmpl/gtkfilechooser.sgml
gtk/gtkfilechooserdefault.c

index 0029ee10874f36da78490bbf6d67a885c82155bc..f30f8154e0242c1e6f494f0ca93bbda90d8aa98c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2006-01-27  Federico Mena Quintero  <federico@ximian.com>
+
+       Fixes bug #328820:
+
+       * gtk/gtkfilechooserdefault.c
+       (gtk_file_chooser_default_class_init): Make GDK_KP_Divide pop up
+       the location dialog populated to "/".
+       (tree_view_keybinding_cb): Likewise.
+       (trap_activate_cb): Likewise.
+
 2006-01-25  Behdad Esfahbod  <behdad@gnome.org>
 
        * gtk/gtkcalendar.c (gtk_calendar_size_request): Use translated format
index 0029ee10874f36da78490bbf6d67a885c82155bc..f30f8154e0242c1e6f494f0ca93bbda90d8aa98c 100644 (file)
@@ -1,3 +1,13 @@
+2006-01-27  Federico Mena Quintero  <federico@ximian.com>
+
+       Fixes bug #328820:
+
+       * gtk/gtkfilechooserdefault.c
+       (gtk_file_chooser_default_class_init): Make GDK_KP_Divide pop up
+       the location dialog populated to "/".
+       (tree_view_keybinding_cb): Likewise.
+       (trap_activate_cb): Likewise.
+
 2006-01-25  Behdad Esfahbod  <behdad@gnome.org>
 
        * gtk/gtkcalendar.c (gtk_calendar_size_request): Use translated format
index 683b133c5d74a25755ec5c784336525bd22b4408..c987c4e0410fe867f4c04c01005a2ac342f7f21b 100644 (file)
@@ -1,3 +1,8 @@
+2006-01-27  Federico Mena Quintero  <federico@ximian.com>
+
+       * gtk/tmpl/gtkfilechooser.sgml: Mention that ~ is also a default
+       key binding.
+
 2006-01-23  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtk-sections.txt: 
index bf391b30a5ffe4d0e1de85446ff3d7f89d7a2d4d..a40982bd2c7d0a4f45e85ed5bfa6792b6988cae6 100644 (file)
@@ -209,8 +209,14 @@ update_preview_cb (GtkFileChooser *file_chooser, gpointer data)
              <row>
                <entry>location-popup</entry>
                <entry>
-                 <keycombo><keycap>Control</keycap><keycap>L</keycap></keycombo>;
-                 <keycap>/</keycap>
+                 <keycombo><keycap>Control</keycap><keycap>L</keycap></keycombo> (empty path);
+                 <keycap>/</keycap> (path of "/")<footnote>
+                   <para>
+                     Both the individual <keycap>/</keycap> key and the
+                     numeric keypad's "divide" key are supported.
+                   </para>
+                 </footnote>;
+                 <keycap>~</keycap> (path of "~")
                </entry>
              </row>
              <row>
@@ -287,10 +293,12 @@ class "GtkFileChooserDefault" binding "my-own-gtkfilechooser-bindings"
          put in the text entry for the file name.  By default this is bound to
          <keycombo><keycap>Control</keycap><keycap>L</keycap></keycombo>
          with a <parameter>path</parameter> string of "" (the empty
-         string); it is also bound to <keycap>/</keycap> with a
+         string).  It is also bound to <keycap>/</keycap> with a
          <parameter>path</parameter> string of "<literal>/</literal>"
          (a slash):  this lets you type <keycap>/</keycap> and
-         immediately type a path name.
+         immediately type a path name.  On Unix systems, this is bound to
+         <keycap>~</keycap> (tilde) with a <parameter>path</parameter> string
+         of "~" itself for access to home directories.
        </para>
 
        <variablelist role="params">
index 2aee3341b18cc92b1ea148886eca7835c48ead25..fde39133ea0c2464b053c467b136f674661b81b2 100644 (file)
@@ -576,6 +576,10 @@ gtk_file_chooser_default_class_init (GtkFileChooserDefaultClass *class)
                                GDK_slash, 0,
                                "location-popup",
                                1, G_TYPE_STRING, "/");
+  gtk_binding_entry_add_signal (binding_set,
+                               GDK_KP_Divide, 0,
+                               "location-popup",
+                               1, G_TYPE_STRING, "/");
 
 #ifdef G_OS_UNIX
   gtk_binding_entry_add_signal (binding_set,
@@ -2938,6 +2942,7 @@ tree_view_keybinding_cb (GtkWidget             *tree_view,
                         GtkFileChooserDefault *impl)
 {
   if ((event->keyval == GDK_slash
+       || event->keyval == GDK_KP_Divide
 #ifdef G_OS_UNIX
        || event->keyval == GDK_asciitilde
 #endif
@@ -3303,6 +3308,7 @@ trap_activate_cb (GtkWidget   *widget,
   modifiers = gtk_accelerator_get_default_mod_mask ();
   
   if ((event->keyval == GDK_slash
+       || event->keyval == GDK_KP_Divide
 #ifdef G_OS_UNIX
        || event->keyval == GDK_asciitilde
 #endif